package cn.orangeframe.neon.domain.enums;

public enum WorkflowStatus {

    RUNNING(false, false),
    COMPLETED(true, true),
    FAILED(true, false),
    TIMED_OUT(true, false),
    ;
    private final boolean terminal;

    private final boolean successful;

    WorkflowStatus(boolean terminal, boolean successful){
        this.terminal = terminal;
        this.successful = successful;
    }

    public boolean isTerminal(){
        return terminal;
    }

    public boolean isSuccessful() {
        return successful;
    }
}
